# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=pipeline
pkgver=19.f4935c9
pkgrel=1
groups=('blackarch' 'blackarch-cracker')
pkgdesc='Designed to aid in targeted brute force password cracking attacks.'
arch=('x86_64' 'aarch64')
url='https://github.com/hirnschallsebastian/Pipeline2'
license=('custom:unknown')
makedepends=('git')
source=("$pkgname::git+https://github.com/hirnschallsebastian/Pipeline2.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  g++ main.cpp -o pipeline -std=c++11 -pthread
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

